package com.trmp.sys.menuMng.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.trmp.commons.service.AbstractService;
import com.trmp.sys.menuMng.dao.MenuShowIndexInfoDao;
import com.trmp.sys.menuMng.entity.MenuShowIndexInfo;
import com.trmp.sys.menuMng.service.MenuShowIndexService;

@Service
@Transactional(rollbackFor=Exception.class)
public class MenuShowIndexServiceImpl extends AbstractService implements MenuShowIndexService
{
	@Autowired
	private MenuShowIndexInfoDao mShowIndexInfoDao;
	
	
	@Override
	@Transactional(propagation=Propagation.NOT_SUPPORTED)
	@Cacheable(value = "DEFAULT_CACHE", key = "")
	public List<MenuShowIndexInfo> getMenuShowIndexInfoList()
	{
		return mShowIndexInfoDao.findAll();
	}

	@Override
	@Transactional(propagation=Propagation.NOT_SUPPORTED)
	@CacheEvict(value = "DEFAULT_CACHE", allEntries = true)
	public void save(MenuShowIndexInfo show)
	{
		mShowIndexInfoDao.save(show);
	}

	@Override
	@Transactional(propagation=Propagation.NOT_SUPPORTED)
	public void delete(MenuShowIndexInfo show)
	{
		mShowIndexInfoDao.delete(show);
	}

	@Override
	@Transactional(propagation=Propagation.NOT_SUPPORTED)
	public MenuShowIndexInfo load(long id)
	{
		return mShowIndexInfoDao.findOne(id);
	}

	@Override
	@Transactional(propagation=Propagation.NOT_SUPPORTED)
	@CacheEvict(value = "DEFAULT_CACHE", allEntries = true)
	public void deleteByid(long id)
	{
	}

	@Override
	@Transactional(propagation=Propagation.NOT_SUPPORTED)
	public void saveList(List<MenuShowIndexInfo> list)
	{
		
	}
	
}
